package com.dong.auth.security.userdetails;

import java.util.Collection;

/**
 * 安全用户
 *
 * @author zhaodongchao
 * @date 2021/10/19 23:30
 */
public interface SecurityUser {
    /**
     * Returns the authorities granted to the user. Cannot return <code>null</code>.
     *
     * @return the authorities, sorted by natural key (never <code>null</code>)
     */
    Collection<String> getAuthorities();

    /**
     * Returns the password used to authenticate the user.
     *
     * @return the password
     */
    String getPassword();

    /**
     * Returns the username used to authenticate the user. Cannot return
     * <code>null</code>.
     *
     * @return the username (never <code>null</code>)
     */
    String getUsername();

    /**
     * 密码是否过期
     */
    boolean isCredentialsExpired();

    /**
     * 当前用户是否被启用
     */
    boolean isLocked();
}
